<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
    <title>注册页面</title>
    <meta charset="UTF-8">
    <script src="${pageContext.request.contextPath}/JQuery/jquery-3.7.1.js"></script>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f4;
            margin: 0;
            padding: 0;
        }
        .container {
            width: 100%;
            max-width: 400px;
            margin: 50px auto;
            padding: 20px;
            background-color: #fff;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }
        h2 {
            text-align: center;
            color: #333;
        }
        form {
            display: flex;
            flex-direction: column;
        }
        label {
            margin-top: 10px;
        }
        input[type="text"],
        input[type="password"] {
            padding: 10px;
            margin-top: 5px;
            border: 1px solid #ddd;
            border-radius: 4px;
        }
        button {
            padding: 10px;
            margin-top: 20px;
            border: none;
            border-radius: 4px;
            background-color: #5cb85c;
            color: white;
            cursor: pointer;
            transition: background-color 0.3s ease;
        }
        button:hover {
            background-color: #4cae4c;
        }
        .register-link {
            margin-top: 10px;
            text-align: center;
            color: #337ab7;
            cursor: pointer;
        }
    </style>
</head>
<body>
<div class="container">
    <h2>注册页面</h2>
    <form action="register" method="post">
        <label for="name">账号名:</label>
        <input type="text" id="name" name="name" required>

        <label for="password">密码:</label>
        <input type="password" id="password" name="password" required>
        <p style="color:red">${registerMessage}</p>
        <button type="submit">注册</button>
        <!-- 返回按钮 -->
        <button class="back-btn" type="button" onclick="window.history.back()">登录</button>
    </form>
</div>
</body>
</html>